<template>
  <!--媒体采风-->
  <div>
    <carousel :autoplaySpeed="autoplaySpeed" :Img="Img"></carousel>
    <div class="wrapper">
      <Row :gutter="16">
        <i-col span="6">
          <ngn :data="data" :activeIndex="activeIndex"></ngn>
        </i-col>
        <i-col span="18">
          <div class="com">
            <p class="p">
              <Icon type="ios-pin"/>
              <span>您现在的位置是:</span><span class="span">{{data.title}}</span><span> > </span><span
              class="span">媒体采风</span>
            </p>
          </div>
          <div class="activity" v-for="activity in activity">
            <Row :gutter="16">
              <i-col span="6">
                <div class="industry">
                  <router-link :to="{path:'textCompile', query:{id:activity.id,activeIndex: 1 }}" class="a">
                    <img :src="activity.phoneUri" alt="">
                  </router-link>
                </div>
              </i-col>
              <i-col span="18">
                <div class="particulars">
                  <h2>
                    <router-link :to="{path:'textCompile', query:{id:activity.id,activeIndex: 1 }}" class="a">
                      {{activity.title}}
                    </router-link>
                  </h2>
                  <p class="p1">{{activity.newsIntro}}</p>
                  <p class="p2">{{activity.lastTimeFormate}}</p>
                </div>
              </i-col>
            </Row>
          </div>
          <!--Vue组件-->
          <div class="page">
            <paging :all="all" @returnValue="returnValue"></paging>
          </div>
        </i-col>
      </Row>
    </div>
  </div>
</template>

<script>
  import carousel from '../module/carousel'
  import ngn from '../module/ngn'
  import lesson from '../module/lesson'
  import paging from '../module/paging'

  export default {
    components: {
      carousel, ngn, lesson, paging
    },
    data() {
      return {
        activeIndex: 3,
        autoplaySpeed: 100000,
        actcilesLink: this.$api.url + '/news/list/all/caifeng/',
        all: 1,
        cur: 1,
        Img: [
          {
            id: 1,
            imageLocation: require('../../assets/img/u69.jpg'),
            state: true,
            uri: "",
          },
        ],
        data: {
          title: '编辑之家',
          list: [
            {list: '编辑活动', link: 'editingActivity'},
            {list: '文章资讯', link: 'actciles'},
            {list: '线上课程', link: 'onlineCourses2'},
            {list: '媒体采风', link: 'mediaStyle'},
          ],
        },
        activity: [],
      }
    },
    mounted() {
      this.dataArray()
    },
    methods: {
      returnValue(data) {
        this.cur = data;
        this.dataArray()
      },
      dataArray() {
        this.$axios.get(this.actcilesLink + this.cur).then((res) => {
          this.activity = res.data.data.lists;
          this.all = res.data.data.totalPage
        });
      },
    },
  }
</script>

<style scoped>
  .com {
    padding-bottom: 20px;
  }

  .com .p {
    padding: 10px 0;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #000;
  }

  .span {
    padding: 0 10px;
  }

  .activity {
    padding-bottom: 20px;
  }

  .activity .industry .a > img {
    width: 100%;
  }

  .particulars .a {
    color: #000;
  }

  .particulars .p1 {
    padding: 10px 0;
    font-size: 15px;
  }

  .particulars .p2 {
    font-size: 15px;
  }
</style>
